package com.training.java.core.collections.one;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;

public class ListDemoCopy {

	public static void main(String[] args) {

		List<String> list = new ArrayList<String>();
		
		list.add("Sam");
		list.add("Almas");
		list.add("Vinod");
		list.add("Henry");
		list.add("Henry");
		
		
		Iterator ite = list.iterator();
		
		while(ite.hasNext())
		{
			String studentName = (String) ite.next();
			System.out.println("Student Name = " + studentName);
		}
		
		for(String studenName : list)
		{
			System.out.println("Student Name = " + studenName);
		}
			
	}

}
